package com.itheima.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.mapper.ClazzMapper;
import com.itheima.pojo.*;
import com.itheima.service.ClazzService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.util.List;

@Service
public class ClazzServiceImpl  extends ServiceImpl<ClazzMapper, Clazz> implements ClazzService {
    @Override
    public PageResult<Clazz> findAll(ClazzQueryParam clazzQueryParam) {
        Page<Clazz> classPage = new Page<>(clazzQueryParam.getPage(),clazzQueryParam.getPageSize());
        Page page = page(classPage);
        return new PageResult<>(page.getTotal(),page.getRecords());



    }
}
